
<template>
  <div style="height:100%;width:100%;position:relative;">
      <div class="pagetop">
          <div class="search-title">快速查询</div>
          <el-input v-model.trim="txtSearch" @input="btnQuery" placeholder="架子类型代码|名称" style="width:200px" :disabled="changeFlag"></el-input>
          <div class="search-title">样本库</div>
          <el-select v-model="selCodeno" filterable style="width:150px" ref="refSelCodeno" @change="btnQuery" :disabled="changeFlag">
              <el-option v-for="(item, index) in selSmpLibrary_Options" :key="index" :value="item.librid" :label="item.librname"></el-option>
          </el-select>

          <div class="top-deal">
              <el-button @click="btnQuery()" icon="el-icon-search" v-has="'PINQUERY'" type="primary">查询</el-button>
              <el-button icon="el-icon-plus" v-has="'PADD'" @click.native="btnAdd()" :disabled="changeFlag">新增</el-button>
              <el-button icon="el-icon-delete" v-has="'PDELETE'" @click.native="btnDel()" :disabled="changeFlag">删除</el-button>
              <el-button icon="el-icon-document" v-has="'PMODIFY'" @click.native="btnSave()" :disabled="!changeFlag">保存</el-button>
              <el-button icon="el-icon-document" v-has="'PMODIFY'" @click.native="btnCancel()" :disabled="!changeFlag">取消</el-button>
          </div>
      </div>
      <div class="pagecenter">
          <rm-layout-right movingcolor="#CCFFFF" :splitwidth=5 :fixsize=400>
              <vxe-table :loading="loading" :data.sync="leftTableData" border fit height="auto" header-align="center" highlight-current-row highlight-hover-row ref="xTable" resizable show-header-overflow="tooltip" show-overflow="tooltip" size="mini" stripe @current-change="CurrentChange" :cell-class-name="CellClassName" :row-class-name="RowClassName">
                  <vxe-table-column field="shelftypeno" title="架子类型代码" width="100"></vxe-table-column>
                  <vxe-table-column field="shelftypename" title="架子类型名称" width="120"></vxe-table-column>
                  <vxe-table-column field="librid" title="样本库ID" align="center" width="60"></vxe-table-column>
                  <vxe-table-column field="librname" title="样本库名称" width="100" align="center"></vxe-table-column>
                  <vxe-table-column field="rownumber" title="总行数" align="center" width="50"></vxe-table-column>
                  <vxe-table-column field="colnumber" title="总列数" align="center" width="50"></vxe-table-column>
                  <vxe-table-column field="posnumber" title="总位置数" align="center" width="60"></vxe-table-column>
                  <vxe-table-column field="description" title="类型说明" width="200"></vxe-table-column>
                  <vxe-table-column field="reservedays" title="保存天数" align="center" width="60"></vxe-table-column>
              </vxe-table>
              <template v-slot:fix>
                  <div style="width:100%;float:left;height:100%;border:1px solid #ccc;overflow:auto;" id="showbox">
                      <el-form :inline="true" @submit.native.prevent label-width="auto" ref="form_bbjlx" :model="detail_Data">
                          <table style="width:100%;font-size:12px;white-space: nowrap; padding-top:3px;text-align: left; align:;center;padding:0px 5px 5px 0px">
                              <tr>
                                  <td style="text-align: right; ">样本库</td>
                                  <td colspan="3">
                                      <el-select v-model="detail_Data.librid" filterable style="width:250px" @change="IsChange" :disabled="true" placeholder="">
                                          <el-option v-for="(item,index) in selSmpLibrary_Options" :key="index" :value="item.librid" :label="item.librname"> <span style="float: left">{{ item.libridname }}</span>
                                              <span style="float: right; color: #8492a6; font-size: 13px">{{ item.librid }}</span>
                                          </el-option>
                                      </el-select>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="text-align: right; ">架子类型代码</td>
                                  <td colspan="3">
                                      <el-input style="width:250px;" v-model="detail_Data.shelftypeno" @input="IsChange" ref="input1" @keyup.enter.native="NextFocus(1)" :disabled="(disabledNo&&!bNulladd)||bIsOccupy"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="color:#F56C6C;text-align: right; ">架子类型名称</td>
                                  <td colspan="3">
                                      <el-input style="width:250px;" v-model="detail_Data.shelftypename" @input="IsChange" ref="input2" @keyup.enter.native="NextFocus(2)" :disabled="!bNulladd"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="color:#F56C6C;text-align: right; ">总行数</td>
                                  <td colspan="3">
                                      <el-input style="width:250px;" v-model="detail_Data.rownumber" @input.native="IsChange" ref="input3" @keyup.enter.native="NextFocus(3)" @blur="BlurText" :disabled="!bNulladd||bIsOccupy"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="color:#F56C6C;text-align: right; ">总列数</td>
                                  <td colspan="3">
                                      <el-input style="width:250px;" v-model="detail_Data.colnumber" @input.native="IsChange" ref="input4" @keyup.enter.native="NextFocus(4)" @blur="BlurText" :disabled="!bNulladd||bIsOccupy"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="text-align: right; ">总位置数</td>
                                  <td colspan="3">
                                      <el-input style="width:250px;" v-model="detail_Data.posnumber" @input="IsChange" ref="txtPosNumber" :disabled="true"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="text-align: right; ">样本保存天数</td>
                                  <td style="width:80px;" colspan="2">
                                      <el-input style="width:60px;" v-model="detail_Data.reservedays" @input="IsChange" placeholder="" ref="input5" @keyup.enter.native="NextFocus(5)" :disabled="!bNulladd"></el-input>
                                      天
                                  </td>
                                  <td style="color:#F56C6C;">&nbsp;[&nbsp;&nbsp;0表示无限期保存。]</td>
                              </tr>
                              <tr>
                                  <td style="text-align: right; vertical-align:top;padding-left: 4px;">类型说明</td>
                                  <td colspan="3">
                                      <el-input :rows="4" style="width:250px;" type="textarea" v-model="detail_Data.description" @input="IsChange" ref="input6" @keyup.enter.native="NextFocus(6)" :disabled="!bNulladd"></el-input>
                                  </td>
                              </tr>
                          </table>
                      </el-form>
                  </div>
              </template>
          </rm-layout-right>
      </div>
      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="提示" :visible.sync="bDelVisible" width="500px" height="300px">
          <span class="el-icon-info">确定删除<b>架子类型:</b><b style="color:red">{{detail_Data.shelftypename}} ({{detail_Data.shelftypeno}})</b>的记录吗？</span>
          <span slot="footer" class="dialog-footer">
              <el-button type="primary" @click="btnDelComfirm">确 定</el-button>
              <el-button @click="btnDelCancel" :autofocus="true">取 消</el-button>
          </span>
      </el-dialog>
  </div>
</template>

<script type="text/javascript">
import $ from "jquery";
import { Promise } from "q";
import { invalid } from "moment";
import md5 from "js-md5";
import XEUtils from "xe-utils";
export default {
  name: "SMP120",
  data() {
      return {
          loading: false,
          changeFlag: false,
          okFirstLoading: true,
          disabledNo: false,
          bDelVisible: false,
          bNulladd: false,
          bIsOccupy: false,
          selflag: 1,
          txtSearch: "", //查询内容（对 样本库代码、名称进行模糊查询）
          selCodeno: "", //样本库类型代码
          selCodena: "", //样本库类型名称
          shelftypeno: "",
          librid: "", //样本库ID
          actionindex: "M", //M默认 A新增 E修改 D删除
          detail_Data: {
              shelftypeno: "", //架子类型代码
              shelftypename: "", //架子类型名称
              librid: "", //样本库ID
              librname: "", //增加的样本库ID名称列
              description: "", //类型说明
              rownumber: 10, //总行数
              colnumber: 10, //总列数
              posnumber: 100, //总位置数
              reservedays: 0, //样本保存天数
          },
          olddetail_Data: {
              shelftypeno: "", //架子类型代码
              shelftypename: "", //架子类型名称
              librid: "", //样本库ID
              librname: "", //增加的样本库ID名称列
              description: "", //类型说明
              rownumber: 10, //总行数
              colnumber: 10, //总列数
              posnumber: 100, //总位置数
              reservedays: 0, //样本保存天数
          },
          selRow: {
              shelftypeno: "", //架子类型代码
              shelftypename: "", //架子类型名称
              librid: "", //样本库ID
              librname: "", //增加的样本库ID名称列
              description: "", //类型说明
              rownumber: 10, //总行数
              colnumber: 10, //总列数
              posnumber: 100, //总位置数
              reservedays: 0, //样本保存天数
          },
          leftTableData: [],
          AddData: [],
          modData: [],
          selSmpLibrary_Options: [], //样本库类型
      };
  },
  watch: {},
  created() {
      this.ddlSmp_Library(); //初始化标本类型
  },
  mounted() {},
  updated() {},
  methods: {
      /*-----------------------------初始化-----------------------------*/
      //获取样本库列表
      ddlSmp_Library() {
          this.$tool
              .request({
                  url: "SMP/SMP1/SMP130",
                  method: "post",
                  data: {
                      action: "q_smp_library",
                  },
              })
              .then((res) => {
                  this.selSmpLibrary_Options = res;
                  if (this.selSmpLibrary_Options.length > 0) {
                      this.selCodeno = this.selSmpLibrary_Options[0].librid; //默认选择第一个样本库
                      this.btnQuery(); //初始化查询
                  }
              });
      },
      /*-----------------------------行改变-----------------------------*/
      CurrentChange({ row, rowIndex }, event) {
          if (this.selflag == "1") {
              this.$nextTick(async () => {
                  await this.CurrentChangeEvent(row, rowIndex);
              });
          } else {
              this.$refs.xTable.setCurrentRow(this.selRow);
              return;
          }
      },
      async CurrentChangeEvent(row, rowIndex) {
          this.shelftypeno = row.shelftypeno;
          this.selflag = "0";
          this.CurrentSave()
              .then(() => {
                  this.selRow = row;
                  this.shelftypeno = row.shelftypeno;
                  this.$refs.xTable.setCurrentRow(row);
                  this.$nextTick(async () => {
                      await this.DetailQuery();
                      this.selflag = "1";
                  });
              })
              .catch((ex) => {
                  this.$refs.xTable.setCurrentRow(this.selRow);
                  this.selflag = "1";
              });
      },
      CurrentSave() {
          this.selflag == "0";
          return new Promise((s, f) => {
              let haschange = false;
              let saveinfo = XEUtils.clone(this.detail_Data, true);
              if (this.actionindex == "M") {
                  //如果是修改
                  if (!XEUtils.isEqualWith(this.olddetail_Data, saveinfo)) {
                      //表单被更改
                      haschange = true;
                      if (this.selCodeno == "") {
                          this.$alert("修改数据前，请先选择对应的样本库！", "提示", {
                              confirmButtonText: "确定",
                          });
                          f();
                          this.$refs.refSelCodeno.focus();
                          return;
                      }
                  }
              } else if (this.actionindex == "A") {
                  //如果是新增
                  haschange = true;
              }
              if (saveinfo.shelftypeno == "") {
                  this.$alert(
                      "架子类型代码不可为空！",
                      "提示",
                      { type: "warning" },
                      {
                          confirmButtonText: "确定",
                      }
                  );
                  f();
                  this.$refs.input1.focus();
                  return;
              }
              if (saveinfo.shelftypename == "") {
                  this.$alert(
                      "架子类型名称不可为空！",
                      "提示",
                      { type: "warning" },
                      {
                          confirmButtonText: "确定",
                      }
                  );
                  f();
                  this.$refs.input2.focus();
                  return;
              }
              if (saveinfo.rownumber == "") {
                  this.$alert(
                      "总行数不可为空！",
                      "提示",
                      { type: "warning" },
                      {
                          confirmButtonText: "确定",
                      }
                  );
                  f();
                  this.$refs.input3.focus();
                  return;
              }
              if (saveinfo.colnumber == "") {
                  this.$alert(
                      "总行数不可为空！",
                      "提示",
                      { type: "warning" },
                      {
                          confirmButtonText: "确定",
                      }
                  );
                  f();
                  this.$refs.input4.focus();
                  return;
              }
              if (saveinfo.reservedays == "") {
                  saveinfo.reservedays = 0;
              }
              if (haschange) {
                  this.$nextTick(async () => {
                      const res = await this.$tool.request({
                          url: "SMP/SMP1/SMP120",
                          method: "post",
                          data: {
                              action: "smp_shelftype_addedit",
                              data: saveinfo,
                              librid: this.selCodeno,
                          },
                      });
                      if (res.errcode == "1") {
                          this.$message({
                              message: "保存成功！",
                              type: "success",
                              showClose: true,
                          });
                          this.shelftypeno = res.keyid;
                          this.changeFlag = false;
                          this.disabledNo = true;
                          //不是删除操作
                          if (this.actionindex == "A") {
                              //新增数据成功后的不刷新操作
                              saveinfo.shelftypeno = this.shelftypeno;
                              this.detail_Data.shelftypeno = this.shelftypeno;
                              this.selSmpLibrary_Options.forEach((item) => {
                                  if (saveinfo.librid == item.librid) {
                                      saveinfo.librname = item.librname;
                                  }
                              });
                              this.$refs.xTable.insertAt(saveinfo, -1).then(({ row }) => {
                                  this.$refs.xTable.setCurrentRow(row);
                                  this.selRow = row;
                              });
                              if (this.addData.indexOf(this.shelftypeno) < 0) {
                                  this.addData.push(this.shelftypeno);
                              }
                          } else if (this.actionindex == "M") {
                              this.SetValueToTable(saveinfo);
                              if (this.modData.indexOf(this.shelftypeno) < 0) {
                                  this.modData.push(this.shelftypeno);
                              }
                          }
                          this.actionindex = "M";
                          s();
                      } else {
                          this.$message({
                              message: "保存失败！" + res.obj,
                              type: "error",
                              showClose: true,
                          });
                          f();
                      }
                  });
              } else {
                  this.changeFlag = false;
                  s();
              }
          });
      },
      /*-----------------------------按钮类-----------------------------*/
      async btnQuery() {
          this.loading = true;
          this.actionindex = "M";
          this.addData = [];
          this.modData = [];
          try {
              const res = await this.$tool.request({
                  url: "SMP/SMP1/SMP120",
                  method: "post",
                  data: {
                      action: "smp_shelftype_query",
                      keystr: this.txtSearch,
                      librid: this.selCodeno,
                  },
              });
              this.leftTableData = res.RData.Data;
              this.leftTableData.forEach((item) => {
                  this.selSmpLibrary_Options.forEach((item2) => {
                      if (item.librid == item2.librid) {
                          item.librname = item2.librname;
                      }
                  });
              });
              this.okFirstLoading = true;
              this.selRow = null;
              if (res.RData.Data.length > 0) {
                  this.bNulladd = true;
                  this.selRow = res.RData.Data[0];
                  this.shelftypeno = res.RData.Data[0].shelftypeno;
                  this.$refs.xTable.setCurrentRow(this.leftTableData[0]);
                  this.librid = res.RData.Data[0].librid;
              } else {
                  this.bNulladd = false;
                  this.shelftypeno = "";
                  this.librid = "";
                  this.detail_Data = {
                      librid: this.selCodeno,
                      shelftypeno: "",
                      shelftypename: "",
                      description: "",
                      rownumber: null,
                      colnumber: null,
                      posnumber: null,
                      reservedays: null,
                  };
              }
              this.loading = false;
              if (this.shelftypeno != "" && this.librid != "") {
                  await this.DetailQuery();
              }
              this.changeFlag = false;
              this.disabledNo = true;
          } catch (e) {
              this.loading = false;
              this.$message({
                  message: e.message,
                  type: "error",
                  showClose: true,
              });
          }
      },
      async DetailQuery() {
          try {
              const res = await this.$tool.request({
                  url: "SMP/SMP1/SMP120",
                  method: "post",
                  data: {
                      action: "smp_shelftype_query_byid",
                      shelftypeno: this.shelftypeno,
                      librid: this.librid,
                  },
              });
              this.detail_Data = res.Data[0];
              this.bIsOccupy = res.isoccupy;
              //换行保存储备数据
              this.olddetail_Data = XEUtils.clone(this.detail_Data, true);
          } catch (e) {
              //e
              this.$message({
                  message: e.message,
                  type: "error",
                  showClose: true,
              });
          }
      },
      btnAdd() {
          if (this.selCodeno != "") {
              this.actionindex = "A";
              this.changeFlag = true;
              this.disabledNo = false;
              this.bIsOccupy = false;
              this.bNulladd = true;
              this.detail_Data = {
                  librid: this.selCodeno,
                  shelftypeno: "",
                  shelftypename: "",
                  description: "",
                  rownumber: 10,
                  colnumber: 10,
                  posnumber: 100,
                  reservedays: 0,
              };
          } else {
              this.$message({
                  message: "请您先选择对应的样本库。",
                  type: "warning",
                  showClose: true,
              });
              this.$nextTick(() => {
                  this.$refs.refSelCodeno.focus();
                  return false;
              });
          }
          this.$nextTick(() => {
              this.$refs.input1.focus();
          });
      },
      btnDel() {
          if (this.detail_Data.shelftypeno == "") {
              this.$message({
                  message: "请您先选择一条数据！",
                  type: "warning",
                  showClose: true,
              });
              return false;
          }
          if (this.bIsOccupy) {
              this.$alert("当前样本架类型已被使用。", "提示", {
                  confirmButtonText: "确定",
                  type: "warning",
              });
              return false;
          }
          if (this.selCodeno == "" || this.selCodeno == null) {
              this.$alert("请您先选择所属的样本库。", "提示", {
                  confirmButtonText: "确定",
                  type: "warning",
              });
              return false;
          }
          this.bDelVisible = true;
      },
      btnDelCancel() {
          this.bDelVisible = false;
          this.$message({
              type: "info",
              message: "已取消删除",
              showClose: true,
          });
      },
      btnDelComfirm() {
          this.bDelVisible = false;
          let that = this;
          this.$tool
              .request({
                  url: "SMP/SMP1/SMP120",
                  method: "post",
                  data: {
                      action: "smp_shelftype_delete",
                      shelftypeno: this.shelftypeno,
                      librid: this.detail_Data.librid,
                  },
              })
              .then((res) => {
                  if (res == "1") {
                      this.$message({
                          message: "删除成功！",
                          type: "success",
                          showClose: true,
                      });
                      this.actionindex = "M";
                      //是删除操作
                      var delrow = that.$refs.xTable.getCurrentRow();

                      if (delrow) {
                          var alld = that.$refs.xTable.getTableData().fullData;
                          var rowindex = alld.indexOf(delrow);
                          that.$refs.xTable.remove(delrow);
                          setTimeout(async () => {
                              let havedata = that.$refs.xTable.tableData;
                              if (havedata.length > 0) {
                                  if (rowindex >= havedata.length) rowindex = havedata.length - 1;
                                  let selectrow = havedata[rowindex];
                                  that.$refs.xTable.setCurrentRow(selectrow);
                                  that.shelftypeno = selectrow.shelftypeno;
                                  await this.DetailQuery();
                                  that.$refs.xTable.scrollToRow(selectrow);
                              }
                          }, 5);
                      }
                  } else {
                      this.$message({
                          message: e.message,
                          type: "删除失败！" + res.obj,
                          showClose: true,
                      });
                  }
              })
              .catch((e) => {
                  this.$alert(e);
              });
      },
      btnSave() {
          let that = this;
          let gData = XEUtils.clone(that.detail_Data, true);
          if (this.actionindex == "M") {
              //无数据时
              if (this.shelftypeno == "") {
                  this.$alert(
                      "请通过新增按钮来添加数据",
                      "提示",
                      { type: "warning" },
                      {
                          confirmButtonText: "确定",
                      }
                  );
                  this.btnCancel();
                  return;
              }
              if (this.selCodeno == "") {
                  this.$alert(
                      "请先选择对应的样本库。",
                      "提示",
                      { type: "warning" },
                      {
                          confirmButtonText: "确定",
                      }
                  );
                  this.$nextTick(() => {
                      this.$refs.refSelCodeno.focus();
                  });
                  this.btnCancel();
                  return;
              }
          }
          if (gData.shelftypename == "") {
              this.$alert(
                  "架子类型名称不可为空！",
                  "提示",
                  { type: "warning" },
                  {
                      confirmButtonText: "确定",
                  }
              );
              this.$refs.input2.focus();
              return;
          }
          if (gData.rownumber == "") {
              this.$alert("总行数不可为空！", "提示", {
                  confirmButtonText: "确定",
                  type: "warning",
              });
              this.$refs.input3.focus();
              return;
          }
          if (gData.colnumber == "") {
              this.$alert(
                  "总列数不可为空！",
                  "提示",
                  { type: "warning" },
                  {
                      confirmButtonText: "确定",
                  }
              );
              this.$refs.input4.focus();
              return;
          }

          if (gData.reservedays == "") {
              gData.reservedays = 0;
          }
          // if (gData.shelftypeno == "") {
          //     gData.shelftypeno = 0;
          // } else {
          //     gData.shelftypeno = parseInt(gData.shelftypeno, 10);
          // }
          this.$tool
              .request({
                  url: "SMP/SMP1/SMP120",
                  method: "post",
                  data: {
                      action: "smp_shelftype_addedit",
                      data: gData,
                      librid: this.selCodeno,
                  },
              })
              .then((res) => {
                  if (res.errcode == "1") {
                      that.$message({
                          message: "保存成功！",
                          type: "success",
                          showClose: true,
                      });
                      this.shelftypeno = res.keyid;
                      this.changeFlag = false;
                      this.disabledNo = true;
                      //不是删除操作
                      if (this.actionindex == "A") {
                          gData.shelftypeno = this.shelftypeno;
                          this.selSmpLibrary_Options.forEach((item) => {
                              if (gData.librid == item.librid) {
                                  gData.librname = item.librname;
                              }
                          });
                          this.detail_Data.shelftypeno = this.shelftypeno;
                          this.$refs.xTable.insertAt(gData, -1).then(({ row }) => {
                              this.$refs.xTable.setCurrentRow(row);
                              this.selRow = row;
                          });
                          if (this.addData.indexOf(this.shelftypeno) < 0) {
                              this.addData.push(this.shelftypeno);
                          }
                      } else if (this.actionindex == "M") {
                          this.SetValueToTable(gData);
                          if (this.modData.indexOf(this.shelftypeno) < 0) {
                              this.modData.push(this.shelftypeno);
                          }
                      }
                      this.selRow = this.$refs.xTable.getCurrentRow();
                      this.actionindex = "M";
                      setTimeout(async () => {
                          if (this.selRow) {
                              await this.DetailQuery(); //查后台记录当前的值方便比较保存后值是否发生改变
                              this.$refs.xTable.setCurrentRow(this.selRow);
                              this.$refs.xTable.scrollToRow(this.selRow);
                          }
                      }, 5);
                  } else {
                      this.actionindex = that.actionindex;
                      this.$message({
                          message: "保存失败！" + res.obj,
                          type: "error",
                          showClose: true,
                      });
                  }
              })
              .catch((e) => {
                  this.$message.error(e);
                  this.$message({
                      message: e,
                      type: "error",
                      showClose: true,
                  });
              });
      },
      async btnCancel() {
          this.actionindex = "M";
          this.changeFlag = false;
          this.disabledNo = true;
          let row = this.$refs.xTable.getCurrentRow();
          if (row) {
              this.shelftypeno = row.shelftypeno;
          }
          await this.btnQuery();
      },
      btnPrint() {},
      btnExport() {},
      /*-------------------------------其它-------------------------------*/
      async SetValueToTable(obj) {
          this.$nextTick(() => {
              this.selRow.shelfid = obj.shelfid;
              this.selRow.shelftypename = obj.shelftypename;
              this.selRow.librid = obj.librid;
              this.selRow.rownumber = obj.rownumber;
              this.selRow.colnumber = obj.colnumber;
              this.selRow.posnumber = obj.posnumber;
              this.selRow.description = obj.description;
              this.selRow.reservedays = obj.reservedays;
          });
      },
      //匹配空|正整数，若不符合条件则清空焦点回归。
      BlurText(e) {
          let Na = new RegExp("(^$)|^[1-9][0-9]*$").test(e.target.value);
          if (!Na) {
              // this.$message.warning("请输入正整数");
              // // e.target.value = "";
              // e.target.focus();
          } else {
              this.detail_Data.posnumber = this.detail_Data.rownumber * this.detail_Data.colnumber;
          }
      },
      IsChange() {
          this.changeFlag = true;
      },
      NextFocus(index) {
          if (index > 5) return false;
          var that = this;
          var focusIndex = index + 1;
          setTimeout(function () {
              that.$refs["input" + focusIndex].focus();
          }, 1);
      },
      /*------------------------------Class------------------------------*/
      CellClassName({ columnIndex, row }) {},
      RowClassName({ row, rowIndex }) {
          if (this.addData.indexOf(row.shelftypeno) > -1) {
              return "rm-new";
          }
          if (this.modData.indexOf(row.shelftypeno) > -1) {
              return "rm-modify";
          }
      },
  },
};
</script>
<style scoped>
.pagetop {
  width: 100%;
  height: 35px;
  display: -webkit-box;
  -webkit-box-pack: left;
  -webkit-box-align: center;
  border: 1px solid #ccc;
  position: absolute;
  font-size: 12px;
  z-index: 99;
  overflow-x: auto;
  white-space: nowrap;
}
.pagetop .top-table {
  float: right;
}
.top-deal {
  right: 5px;
  position: absolute;
  top: 5px;
  display: flex;
  align-items: center;
}
.search-title {
  margin: 0 5px 0 20px;
  font-size: 12px;
}
.pagecenter {
  position: absolute;
  top: 40px;
  width: 100%;
  left: 0;
  bottom: 0px;
  overflow: auto;
}

.middle-center {
  position: absolute;
  height: 100%;
  left: 0px;
  right: 455px;
  overflow: auto;
}

.middle-right {
  position: absolute;
  height: 100%;
  width: 450px;
  right: 0px;
}
table {
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 5px;
}
.table1style tr td {
  padding: 0px 2px 0px 5px;
}
::v-deep .el-input.is-disabled .el-input__inner {
  color: #606266;
  cursor: not-allowed;
}
::v-deep  .vxe-table .vxe-body--column.col-orange {
  background-color: #f8f8f8;
}
::v-deep .el-input--suffix .el-input__inner {
  padding-right: 5px;
}

::v-deep .el-textarea__inner {
  padding: 5px 5px;
}
::v-deep  tr.vxe-body--row.row--current {
  color: #000000;
  font-weight: bold;
}
</style>
